package com.edu.bean;
/*
 * @Author:princess
 * @Date 2023/9/27 09 27 19:27
 *
 */

import java.util.List;

/*
    一对多映射：需要在一的一方里维护多的一方的属性
                嵌套结果
                嵌套查询
 */
public class Depart {
    private int departId;
    private String departName;
    private String departPhone;
    private List<Emp> empList;

    public Depart(int departId, String departName, String departPhone, List<Emp> empList) {
        this.departId = departId;
        this.departName = departName;
        this.departPhone = departPhone;
        this.empList = empList;
    }

    public Depart() {
    }

    @Override
    public String toString() {
        return "Depart{" +
                "departId=" + departId +
                ", departName='" + departName + '\'' +
                ", departPhone='" + departPhone + '\'' +
                ", empList=" + empList +
                '}';
    }

    public int getDepartId() {
        return departId;
    }

    public void setDepartId(int departId) {
        this.departId = departId;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getDepartPhone() {
        return departPhone;
    }

    public void setDepartPhone(String departPhone) {
        this.departPhone = departPhone;
    }

    public List<Emp> getEmpList() {
        return empList;
    }

    public void setEmpList(List<Emp> empList) {
        this.empList = empList;
    }
}
